import ReactDOM from 'react-dom'
import Context from './context'
import useRedux from './useRedux'

import Component1 from './components/Component1'
import Component2 from './components/Component2'

function App () {
  const { state, dispatch } = useRedux()
  return (
  <Context.Provider value={{ dispatch, state }}>
    <h1>useContext + useReducer</h1>
    <p>{state.age}</p>
    <Component1 />
    <Component2 />
  </Context.Provider>)
}

ReactDOM.render(<App/>, document.getElementById('root'))
